Skip to content

test: raise coverage to 70.67% (target: 95)#131

Open
mastermanas805 wants to merge 1 commit into
mainfrom
coverage/raise-to-95
Open

test: raise coverage to 70.67% (target: 95)#131
mastermanas805 wants to merge 1 commit into
mainfrom
coverage/raise-to-95

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

  • Adds 33 new tests across 6 files covering static legal pages (Privacy, Terms, NotFound, Blog), the UseCasesPage filter logic, and the SSE-over-fetch streamer (src/lib/sseStream.ts).
  • Coverage: 67.54% -> 70.67% (src-only: ~76%). Test count: 736 -> 769, all passing.

Why these targets

The 0%-covered files identified by the baseline vitest run included a mix of:

  • Trivially-testable static pages (Privacy, Terms, NotFound, Blog) - covered here.
  • A standalone library file (sseStream.ts, 89 lines, 9 branches) - covered here.
  • A non-trivial filter UI (UseCasesPage with category-chip filtering + grouping) - covered here.
  • Large authenticated pages (SettingsPage 635 lines, DocsPage 369, LoginPage 253, CheckoutPage 237) - not covered here; full coverage would require API mock plumbing larger than the budget.
  • Bootstrap / SSG entry points (App.tsx, entry-server.tsx, scripts/prerender.mjs) - covered by the Playwright e2e suite, not addressable via vitest.

Test plan

Remaining gap to 95% is concentrated in the large authenticated-route pages; tracked for a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Adds 6 test files covering BlogPage, NotFoundPage, PrivacyPage, TermsPage,
UseCasesPage, and the SSE-over-fetch streamer (src/lib/sseStream.ts).

Coverage: 67.54% → 70.67% (src-only: ~76%).

33 new tests, all passing. Test count: 736 → 769.

Remaining gap: src/pages/{SettingsPage,DocsPage,LoginPage,CheckoutPage,
ContractsPage,AdminCustomersPage}.tsx are large (200-635 lines each) and
authenticated; full coverage requires more API mock plumbing than the
budget allowed. src/App.tsx + entry-server.tsx + scripts/prerender.mjs
are bootstrap/SSG paths exercised only by the e2e Playwright suite — not
addressable via vitest unit tests. Root-level files (playwright.config.ts,
e2e/fixtures.ts) count as 0% in the coverage table but are runtime-irrelevant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/assets/index-BwyF-Dau.js 143.87 KB (0%)
dist/assets/index-C9T0ot61.css 6.19 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants